package com.kevin.sharding.demo.dao;

import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Component;

/**
 * @version DictDao.java v2.0
 * @description:
 * @author: wenze
 * @create: 2020/9/3 22:37
 **/
@Mapper
@Component
public interface DictDao {

    @Insert("insert into t_dict(dict_id,type,code,value) values(#{dictId},#{type},#{code},#{value})")
    void insertDict(@Param("dictId") Long dictId, @Param("type") String type, @Param("code") String code, @Param("value") String value);

    @Delete("delete from t_dict where dict_id = #{dictId}")
    void delDict(@Param("dictId") Long dictId);

    @Update("update t_dict set code = #{code} where dict_id = #{dictId}")
    void updateDict(@Param("code") String code,@Param("dictId") Long dictId);
}
